<?php
namespace app\zhonghang\controller;
use think\Controller;
use think\Request;
use think\Db;
use think\Session;
use think\Lang;
use think\Cookie;

require_once (APP_PATH . 'api/RewardApi.php');
require_once (APP_PATH . 'api/SmsApi.php');
require_once (APP_PATH . 'api/FinanceApi.php');
class Reg extends Controller {
	//空操作
	public function _initialize(){
		parent::_initialize();
		define('SC_SYS','http://sksc.quyum99.com');
	}
	
	public function _empty(){
		header("HTTP/1.0 404 Not Found");
		$this->display('Public:404');
	}
	

	/**$list
	 * 招贤纳士
	 */
	public function index(){
	    $zifuji=Cookie::get('think_var');
        $chanpin =  DB::name('Goods_category')->where('parent_id',0)->where('is_show',1)->limit('1')->find();
        $erweima = DB::name('Website')->where('w_logo_status',1)->find();
        $xxll = DB::name('tongyong')->where('id',6)->find();
        $list = DB::name('team_type_recruit')->order('time desc')->select();
        if($zifuji=='zh-cn'){
            $list = DB::name('team_type_recruit')->select();
//            $list['title']=htmlspecialchars_decode($list['title']);
        }elseif($zifuji=='en-us'){
            $list = DB::name('team_type_recruit_us')->select();
//            $list['title']=htmlspecialchars_decode($list['title']);
        }else{
            $list = DB::name('team_type_recruit_jp')->select();
//            $list['title']=htmlspecialchars_decode($list['title']);
        }
//        dump($list);die();
        $zxnstp=DB::name('Config')->where('name','zxnstp')->value('value');
        $this->assign('zxnstp',$zxnstp);
        $lists = DB::name('Website')->find();
        $lisst = Lang::get('dbcp');
        $this->assign('lisst',$lisst);
        $this->assign('lists',$lists);
        $this->assign('list',$list);
        $this->assign('xxll',$xxll);
        $this->assign('erweima',$erweima);
        $this->assign('chanpin',$chanpin);
		return $this->fetch('rc/rc');
	}

    public function rczp()
    {
        $chanpin =  DB::name('Goods_category')->where('parent_id',0)->where('is_show',1)->limit('1')->find();
        $erweima = DB::name('Website')->where('w_logo_status',1)->find();
        $zifuji=Cookie::get('think_var');
        $id = input('id');
        if($zifuji=='zh-cn'){
            $list = DB::name('team_type_recruit')->where('id',$id)->find();
//            dump($list);
            $list['c_content']=htmlspecialchars_decode($list['c_content']);
        }elseif($zifuji=='en-us'){
            $list = DB::name('team_type_recruit_us')->where('id',$id)->find();
            $list['c_content']=htmlspecialchars_decode($list['c_content']);
        }else{
            $list = DB::name('team_type_recruit_jp')->where('id',$id)->find();
            $list['c_content']=htmlspecialchars_decode($list['c_content']);
        }
        $lists = DB::name('Website')->find();
        $this->assign('lists',$lists);
        $this->assign('list',$list);
        $lisst = Lang::get('dbcp');
        $this->assign('lisst',$lisst);
        $this->assign('erweima',$erweima);
        $this->assign('chanpin',$chanpin);
        return $this->fetch('rc/rczp');
    }



}